Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small refactoring to load from ckpt #203

Merged
merged 4 commits into from
Jun 28, 2024
Merged

Small refactoring to load from ckpt #203

merged 4 commits into from
Jun 28, 2024

Conversation

sfmig
Copy link
Collaborator

@sfmig sfmig commented Jun 27, 2024

Following suggestions from a similar code review, this PR

  • moves the computation of the checkpoint type to detection_utils,
  • refactors the main training script to reduce length.

Let me know what you think!

thanks 🙌

@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 23.52941% with 13 lines in your changes missing coverage. Please review.

Project coverage is 37.14%. Comparing base (87babb5) to head (94361ab).

Files Patch % Lines
crabs/detection_tracking/detection_utils.py 36.36% 7 Missing ⚠️
crabs/detection_tracking/train_model.py 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #203      +/-   ##
==========================================
+ Coverage   37.05%   37.14%   +0.08%     
==========================================
  Files          20       20              
  Lines        1414     1416       +2     
==========================================
+ Hits          524      526       +2     
  Misses        890      890              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@nikk-nikaznan nikk-nikaznan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, make sense to me. Just small suggestion, should we only call the function if there is checkpoint_path? So we also don't need to check the condition, if the path is not there

crabs/detection_tracking/train_model.py Outdated Show resolved Hide resolved
@sfmig sfmig force-pushed the smg/small-refactoring-ckpt branch from 4668b58 to 94361ab Compare June 27, 2024 17:28
@sfmig sfmig marked this pull request as ready for review June 27, 2024 17:36
@sfmig sfmig requested a review from nikk-nikaznan June 27, 2024 17:37
@sfmig sfmig mentioned this pull request Jun 27, 2024
@sfmig
Copy link
Collaborator Author

sfmig commented Jun 28, 2024

By mistake I merged PR #141 before this one, instead of merging this --> rebasing PR #141 ---> merging PR #141.

Just leaving a log here in case we need to inspect the commit history at some point and are confused about it.

@sfmig sfmig merged commit e247e89 into main Jun 28, 2024
5 checks passed
@sfmig sfmig deleted the smg/small-refactoring-ckpt branch June 28, 2024 09:51
sfmig added a commit that referenced this pull request Jul 8, 2024
* Move checkpoint type computation to utils

* Refactor checkpointing in training script

* Get ckpt type if ckpt is passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants